import request from '@/plugin/axios'

export function queryPosts (data) {
  return request({
    url: '/v1/post/list',
    method: 'post',
    data
  })
}

export function addPost (data) {
  return request({
    url: '/v1/post/add',
    method: 'post',
    data
  })
}

export function updatePost (id, data) {
  return request({
    url: `/v1/post/updateById/${id}`,
    method: 'post',
    data
  })
}

export function removePost (data) {
  return request({
    url: `/v1/post/deleteByIds`,
    method: 'post',
    data
  })
}
